package com.weasel.weixin.commons.user.bean;

import org.codehaus.jackson.annotate.JsonProperty;

import java.io.UnsupportedEncodingException;

/**用户分组
 * Created by Dylan on 2015/10/20.
 */
public class Group {

    @JsonProperty("id")
    private int id;  //分组id，由微信分配

    @JsonProperty("name")
    private String name;  //分组名字，UTF8编码

    @JsonProperty("count")
    private int count;  //分组内用户数量

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        try {
            return new String(name.getBytes("utf8"),"utf8");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }
}
